home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
MAZE__
/
CMAZEPAN.H
< prev
next >
Wrap
Text File
|
1991-12-29
|
1KB
|
52 lines
/****
* CMazePane.h
*
* Pane class for a typical application.
*
****/
#define _H_CMazePane /* Include this file only once */
#include <CPanorama.h>
struct CMazePane : CPanorama {
Handle MazeHandle;
char *MazeDat;
int MazeRows;
int MazeCols;
int RowSize;
/** Contruction/Destruction **/
void IMazePane(CView *anEnclosure, CBureaucrat *aSupervisor,
short aWidth, short aHeight,
short aHEncl, short aVEncl,
SizingOption aHSizing, SizingOption aVSizing);
void SetMazeRows( int rows );
void SetMazeCols( int cols );
void SetRowSize( int rowSize );
void SetMazeDat( char *dat);
void SetMazeHandle( Handle );
/** Drawing **/
void Draw(Rect *area);
int rnd(int low, int hi);
void setSquare(int row, int col, char val);
char getSquare(int row, int col);
int legalPath(int row, int col, int dir);
int randomDir(void);
int power(int base, int n);
void buildPath(int row, int col, int dir);
void CreateMaze(void);
/** Mouse **/
void DoClick(Point hitPt, short modifierKeys, long when);
Boolean HitSamePart(Point pointA, Point pointB);
/** Cursor **/
void AdjustCursor(Point where, RgnHandle mouseRgn);
/** Scrolling **/
void ScrollToSelection(void);
};